<template>
  <div>
    <!-- 子页面 -->
    <!-- router-view告诉路由，子页面应该渲染在这里 -->
    <router-view></router-view>
    <!-- 底栏 -->
    <!-- 底部标签栏 -->
    <van-tabbar route placeholder>
      <van-tabbar-item replace to="/article" icon="notes-o" color="#fa6d1e">面经
      </van-tabbar-item>
      <van-tabbar-item replace to="/collection" icon="star-o" color="#fa6d1e">收藏
      </van-tabbar-item>
      <van-tabbar-item replace to="/favorite" icon="like-o" color="#fa6d1e">喜欢
      </van-tabbar-item>
      <van-tabbar-item replace to="/myself" icon="user-o" color="#fa6d1e">我的
      </van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
import LessonsLearned from '../components/lessons/lessons-learned.vue'
import Favorite from '../components/favorite/favorite.vue'
import Favourite from '../components/favourite/favourite.vue'
import UserInfo from '../components/user/user.vue'
export default {
  data() {
    return {
      active: 0
    }
  },
  components: {
    LessonsLearned,
    Favorite,
    Favourite,
    UserInfo
  },
  methods: {
    showActive() {
      console.log(this.active);
    }
  }
}
</script>

<style scoped>
.van-tabbar-item--active {
  color: #fa6d1e;
}
</style>